import request from '@/router/axios';

// 补单原因
export const getReplacementReasonDict = () => {
  return request({
    url: '/api/xmbz-order/order/getReplacementReason',
    method: 'get'
  })
}

// 责任部门
export const getReplacementResponsibleDepartmentDict = () => {
  return request({
    url: '/api/xmbz-order/order/getReplacementResponsibleDepartmentDict',
    method: 'get'
  })
}

// 蛋糕去向
export const getCakeWhereaboutsDict = () => {
  return request({
    url: '/api/xmbz-order/order/getCakeWhereaboutsDict',
    method: 'get'
  })
}

// 蛋糕去向
export const getIsProductionDict = () => {
  return request({
    url: '/api/xmbz-order/order/getIsProductionDict',
    method: 'get'
  })
}

// 提交异常补单
export const submitAnomalyReplacementOrder = (data) => {
  return request({
    url: '/api/xmbz-order/order/anomalyReplacementOrder',
    method: 'post',
    params: data
  })
}

// 获取异常补单
export const getAnomalyReplacementOrder = (data) => {
  return request({
    url: '/api/xmbz-order/order/getAnomalyReplacementOrder',
    method: 'get',
    params: data
  })
}

// 获取部门失误类型
export const getResponsibleDepartmentErrorTree = () =>{
  return request({
    url: '/api/xmbz-work/work/getResponsibleDepartmentErrorTree',
    method: 'get',
  })
}

